package com.brillilab.service.module.message.template.impl.method;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: ReceiveMemberRecommendMethodTemp
 * @ProjectName brill_lab
 * @Description: 管理员收到成员推荐方法
 * @date 2019/5/27 18:08
 */
@Data
public class ReceiveMemberRecommendMethodTemp extends AbstractMessageTemplate {
    private String memberName;
    private String methodName;

    /**
     * 管理员收到成员推荐方法
     * @param labId       实验室ID
     * @param receiverId  接收人ID
     * @param labMemberId 接收者实验室成员Id
     * @param memberName  成员姓名
     * @param methodName  方法名称
     * @param referId     业务关联ID
     */
    public ReceiveMemberRecommendMethodTemp(Long labId, Long receiverId, Long labMemberId, String memberName, String methodName, Long referId) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.ReceiveMemberRecommendMethod.getValue());
        super.setTitle("有成员的推荐方法待审核");
        String content = String.format("<span>您收到</span><span style='color:#F6AC2D'>%s</span><span>推荐的</span>" +
                        "<span style='color:#F6AC2D'>%s</span><span>方法</span>",
                memberName, methodName);
        super.setContent(content);
        super.setAppContent(String.format("您收到%s推荐的%s方法",memberName, methodName));
        this.labMemberId = labMemberId;
        this.memberName = memberName;
        this.methodName = methodName;
        this.referId = referId;
    }

}
